<template>
  <div class="com-container">
    <div class="com-chart" ref="listOne"></div>
  </div>
</template>

<script>
import echarts from "echarts";
export default {
  name: "index",
  data() {
    return {
      chartInstance:null
    }
  },
  mounted() {
    this.initChart()
    this.getData()
  },
  methods:{
    //初始化echartInstance对象
    initChart(){
      this.chartInstance=this.$echarts.init(this.$refs.listOne)
    },
    //获取服务器的数据
    getData(){
    this.axios.get('').then((response)=>{

    })
    },
    //更新图表
    updateChart(){
      const option={

      }
      this.chartInstance.setOption(option)
    }
  }
}
</script>

<style scoped>

</style>
